package xyz.syyrjx.util;

import java.security.SecureRandom;
import java.util.Random;

/**
 * @author 大地崩坏苍蝇兽
 * @date 2023/1/12 - 16:22
 */
public class SyyrjxRpcRandomUtil {

    private final static Random RANDOM = new Random();

    private final static SecureRandom SECURE_RANDOM = new SecureRandom();


    public static int randomInt() {
        return RANDOM.nextInt();
    }

    public static int randomInt(int bound) {
        return RANDOM.nextInt(bound);
    }

    public static int secureRandomInt() {
        return SECURE_RANDOM.nextInt();
    }

    public static int secureRandomInt(int bound) {
        return SECURE_RANDOM.nextInt(bound);
    }

}
